package 学生管理系统.MOL;

       public class Login {
	public boolean Verification(String user, String pass) {// 登陆验证
		if(user.equals(null))
                return false;
                UserDaoJDBC sdm = new UserDaoJDBC();

		TeaUser u = new TeaUser(user, pass);
		if (sdm.readTeaUser(user).equals(u))
			return true;
                else
		        return false;
	}

	public void register(String user, String pass) {// 注册
		UserDaoJDBC sdm = new UserDaoJDBC();
		TeaUser u = new TeaUser(user, pass);
		sdm.writeTeaUser(u);
	}
 
        public boolean StuVerification(String user, String pass) {
            UserDaoJDBC sdm = new UserDaoJDBC();
           System.out.println("user");
            if(user.equals(""))
                return false;
		StuUser u = new StuUser(user, pass);
		if (sdm.readStuUser(user).equals(u))
			return true;
                else
		        return false;
            
        }
        public void Sturegister(String user, String pass) {// 注册
		UserDaoJDBC sdm = new UserDaoJDBC();
		StuUser u = new StuUser(user, pass);
		sdm.writeStuUser(u);
	}
	public Login() {

	}

}